using UnityEngine;
using BehaviorDesigner.Runtime;
using BehaviorDesigner.Runtime.Tasks;
using Gameplay;

public class IsDead : Conditional
{
	private Character _character;

	public override void OnStart()
	{
		_character = GetComponent<Character>();
	}

	public override TaskStatus OnUpdate()
	{
		if (_character.Dead) 
		{
            return TaskStatus.Success;
		}
		else 
		{
			return TaskStatus.Failure;
		}
		
	}
}